Imports some or all workspace data that was exported by exporter.pm as described in Exporter.pm. Importing other file formats is also supported.
Syntax
./importer.pm <options>
Option | Description |
---|---|
--arfile=<file> | -a=<file> |
Archive file. |
--project=<project> | -p=<project> |
Project (workspace) ID to import . |
--type=<type> | -t=<type> |
Type of operation to map. |
--useparentnode | -u |
Use parent node. |
--disablenumg | -g |
Disable the number generator. Use this option when importing to an existing workspace. |
--rootnode | -r |
Create new root node. |
--startnode=<n>| -n=<n> |
Import to the specified folder instead of the root folder. Use this option when importing to an existing workspace. |
--stfile=<file> | -s=<file> |
Structure file. For information about the format of this file, see Standard CSV format. |
--verbose | -v |
Verbose output. Writes debug information to the debug log (by default, located at /var/tmp/krono-<host>-<port>/kronotest.log.<uid> or similar). |
Remarks
When invoked without parameters, the script outputs usage information.
It is generally not necessary to specify the formats of the input files. Project Portal can detect the file format.
The import functionality is very sensitive to possible errors in the data. Great care must be taken if the data to be imported has been produced through other means than exporting a complete workspace.
The structure (CSV) file can be contained inside the archive file. The value for the arfile option can also be a directory.
For example, all of the following will work:
./importer.pm –s project.csv –a project.tar
./importer.pm –-arfile project.tar
./importer.pm –a /path/to/unpacked/tar/
./importer.pm –s project.csv
In the last example, no files are created in the new workspace.
To import a new workspace, the structure file must contain a meta line as described in Standard CSV format.